﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<Dictionary<CourseSystem.Common.Models.UserModel, DateTime>>" %>
<%@ Import Namespace="CourseSystem.Common.Models" %>
<% var teacherCount = Model.Count(o => (int) o.Key.UserType == 2);
   var studentCount = Model.Count(o => (int)o.Key.UserType == 1); 
    %>
教师(<%=teacherCount %>)<br />
<% foreach(KeyValuePair<UserModel,DateTime> item in Model.Where(o=>(int)o.Key.UserType==2)){ %>
<%=item.Key.UserName %> <br />
<%} %>
学生(<%=studentCount%>)<br />
<% foreach(KeyValuePair<UserModel,DateTime> item in Model.Where(o=>(int)o.Key.UserType==1)){ %>
<%=item.Key.UserName %> <br />
<%} %>
<link href="<%=ResolveUrl("~/Content/Logoned.css") %>" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    window.setInterval("reload()", 1000*10);
    var reload = function () {
          //window.location.reload();
        parent.$("#rightFrame").attr("src", parent.$("#rightFrame").attr("src"));
    };

</script>